package com.cqut.forum.service;

import java.util.List;
import java.util.Map;

import com.cqut.forum.entity.Picture;
import com.cqut.forum.entity.User;

/**
 * 图片服务接口
 * @author yangxun
 */
public interface PictureService {
	
	public List<Map<String, Object>> getByGroupId(int groupId,int index,int size,String orderCase,boolean asc);
	
	public List<Map<String, Object>> getFriendPicture(int userId,int index,int size);
	
	public List<Map<String, Object>> getLastPicture(int index,int size);
		
	public List<Map<String, Object>> getMyAllPicture(int userId,int index,int size,String orderCase,boolean asc);
	
	public List<Map<String, Object>> getMyUnread(User user,int index,int size);
	
	/**
	 * 获取热门照片
	 * @param index
	 * @param size
	 * @return
	 */
	public List<Map<String, Object>> getHotPicture(int index,int size);
	
	public List<Map<String, Object>> getByLikeName(String groupName,int index,int size);
	
	public boolean insert(List<Picture> picture);
	
	public Picture getById(int pictureId);
	
	public Picture update(Picture picture);
	
	public int getPictureIndex(int groupId,int pictureId);
	
	public Picture deleteById(int pictureId);
	public boolean updatePictureState(int pictureId,boolean state);
	
	public List<Map<String, Object>> loadPicture(String pictureOwner,String pictureType,
			String uploadTime,int index,int size);
	
	public User getPictureOwner(int pictureId);
}
